All Questions
12 questions
1vote
1answer
369views
Google Foobar challenge optimization
I am trying to solve Google Foobar challenge prepare-the-bunnies-escape using my own approach, instead of BFS. I attempt to solve two ends of the maze and try to ...
7votes
2answers
3kviews
Find the closest enemy in a 2D grid with wrapping allowed
I'd like feedback on my solution to the outlined programming challenge. Is numpy a good candidate module for this? What might be a more efficient or Pythonic solution? Closest Enemy II Have the ...
7votes
2answers
6kviews
Find the correct path through a 5 x 5 grid (coderbyte 'Correct path')
I've completed the following coderbyte question and would like feedback as to whether it follows Python best practices, is efficient and so forth. The coderbyte problem: Have the function ...
7votes
1answer
2kviews
Python program to find a word ladder transforming "four" to "five"
I saw this Puzzling problem and thought I would try to write a Python program to solve it. The task is to transform "four" to "five", forming a new four-letter word at each step, replacing one letter ...
12votes
1answer
6kviews
Google FooBar "Prepare The Bunnies Escape"
I'm currently working through the google FooBar challenge, and I'm on the third level, in which I have to find the distance between the top left and bottom right points on a grid. The grid is filled ...
14votes
3answers
7kviews
Maze solver and generator in Python
After watching Computerphile's video I decided to create my own maze solver and generator in Python. I've never written anything in Python so I'd like to get some feedback about my code, specifically ...
11votes
1answer
6kviews
Find the shortest path through a maze with a twist: you can knock down one wall
I would like my solution to Google Foobar's prepare_the_bunnies_escape checked for readability, maintainability, extensibility, style, design. I am looking forward ...
8votes
1answer
17kviews
Shortest Path For Google Foobar (Prepare The Bunnies Escape)
I have been working on Google Foobar since a few days ago. I am currently in the third level but is stuck in the second challenge of "Prepare the Bunnies' Escape." I have checked this post but it did ...
6votes
2answers
6kviews
BFS shortest path for Google Foobar challenge "Prepare the Bunnies' Escape"
This is the Google Foobar challenge "Prepare the Bunnies' Escape": You have maps of parts of the space station, each starting at a prison exit and ending at the door to an escape pod. The map is ...
8votes
2answers
6kviews
BFS shortest path for Google Foobar "Prepare the Bunnies' Escape"
This is the Google Foobar puzzle "Prepare the Bunnies' Escape": You have maps of parts of the space station, each starting at a prison exit and ending at the door to an escape pod. The map ...
4votes
1answer
3kviews
Finding the longest path, avoiding obstacles in a 2D plane
The Scenario You are given a matrix of size m x n (width x height) with m*n spots where there are a few obstacles. Spots with obstacles are marked as 1, and those without are marked as 0. You can ...
3votes
2answers
2kviews
Recursive uniform cost search that needs to be optimized
I have this uniform cost search that I created to solve Project Euler Questions 18 and 67. It takes the numbers in the txt file, places them into a two dimensional list, and then traverses them in a ...